package nancal.mp.db.es

import nbcp.base.db.annotation.DbEntityGroup
import nbcp.base.db.annotation.DbName
import nbcp.myoql.db.comm.IkFieldDefine
import nbcp.myoql.db.es.base.IEsDocument

@DbName("sys-log")
@DbEntityGroup("system")

@IkFieldDefine(
    "module", "msg", "remark",
    "requestUrl", "requestHeaders", "requestBody",
    "responseHeaders", "responseBody",
    "aopErrorType", "aopErrorMessage", "aopClassType", "aopMethodName"
)
class SystemLogEntity : IEsDocument {
    var id: String? = null
    var appName: String = ""
    var module: String = ""
    var userId: String? = null
    var userName: String? = null
    var msg: String? = null
    var remark: String? = null
    var requestUrl: String? = null
    var requestMethod: String? = null
    var requestHeaders: Array<String>? = null
    var requestBody: String? = null
    var responseStatus: Int? = null
    var responseHeaders: Array<String>? = null
    var responseBody: String? = null

    var tags: Array<String>? = null

    var aopErrorType: String? = null
    var aopErrorMessage: String? = null
    var aopErrorStacks: String? = null
    var aopClassType: String? = null
    var aopMethodName: String? = null
    var aopMethodParameter: Any? = null
    var aopMethodResult: Any? = null
}
